package com.woniu.controller;

import com.woniu.util.SnowflakeIdWorker;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 杨光 微信号:tolryg
 * @time 12:11
 */

@RestController
public class IdController {


    @GetMapping("order/web/pk")
    public String generateOrderId(){

        Long id = SnowflakeIdWorker.generateId();
        System.out.println("id = " + id);
        return "p"+id;

    }
}
